package com.xingda.packing.enums;

import lombok.Getter;

public enum TaskUploadType {

    AUTO(1, "自动上传"),
    OTHER(99, "异常"),
    MANUAL(2, "手动上传");

    TaskUploadType(int number, String desc) {
        this.number = number;
        this.desc = desc;
    }

    @Getter
    private final int number;

    @Getter
    private final String desc;

    public static TaskUploadType getById(int id) {
        for (TaskUploadType value : TaskUploadType.values()) {
            if (value.getNumber() == id) {
                return value;
            }
        }
        return OTHER;
    }

}
